<table class="table table-hover" style="border-collapse: separate">
    <thead>
        <tr>
            <th style="text-align: center"><a href="#" onclick="checkAll(this)">Check</a> / <a href="#" onclick="checkAll(this)">Uncheck</a></th>
            <th>TITLE</th>
            <th>POSTED BY</th>
            <th style="text-align: center">ACTIVATION</th>
            <th>DATE POSTED</th>
        </tr>
    </thead>
    <tbody>
        <?php
        //Kiểm tra nếu có dữ liệu thì sẽ hiển thị
        if(!empty($list)): 
        ?>
        <?php foreach($list as $item): ?>
        <tr>
            <td style="text-align: center"><input type="checkbox" class="checkbox" name="selected_items[]" /></td>
            <td><a class="bt-detail" href="?com=content&view=entry&id=<?php echo $item['EntryId'] ?>"><?php echo $item['Title'] ?></a></td>
            <td><a class="bt-detail" href="?com=user&view=detail&uid=<?php echo $item['UserId'] ?>"><?php echo $item['Username'] ?></a></td>
            <td style="text-align: center">
                <a href="?com=content&action=publish&id=<?php echo $item['EntryId'] ?>" class="bt-active" title="Click to change status">
                    <span class="img-circle <?php echo ($item['Published'] == '1')?'green':'red' ?>">
                        <?php echo $item['Published'] ?>
                    </span>
                </a>
            </td>           
            <td><?php echo date('g:i:s A d-m-Y', strtotime($item['DatePosted'])) ?></td>            
        </tr>
        <?php endforeach; ?>
        <?php
        //Ngược lại thì thông báo không có dữ liệu
        else: 
        ?>
        <tr>
            <td colspan="5" class="text-error">Nothing...</td>
        </tr>
        <?php endif; ?>
    </tbody>
</table>